<<<<<<< .mine
<?php
/**
 * router class
 * @author matt@178.com
 * @version 1
 *
 */
class SnsRouter{
	/**
	 * @var Router
	 */
	static $instance;
	static $class = __CLASS__;
	/**
	 * 模块名
	 *
	 * @var string
	 */
	var $app;
	/**
	 * 控制器名
	 *
	 * @var string
	 */
	var $controller;
	/**
	 * 方法名
	 *
	 * @var string
	 */
	var $action;
	/**
	 * 类不存在
	 *
	 */
	const CLASS_NOT_FOUND = 10001;
	/**
	 * 方法不存在
	 *
	 */
	const METHOD_NOT_FOUND = 10002;
	/**
	 * 构造方法
	 *
	 */
	public function __construct(){
//		$this->initialize();
	}
	/**
	 * 析构方法
	 *
	 */
	public function __destruct(){
		
	}
	
	/**
	 * 工厂方法
	 * @return Router
	 */
	public static function getInstance(){
		if(empty(self::$instance)){
			self::$instance = new self::$class();
		}
		return self::$instance;
	}
	/**
	 * 初始化
	 *
	 */
	public function initialize(){
		$this->parseURI();	
//		$this->app 			= _('_app', 'index');
//		$this->controller	= _('_controller', 'index');
//		$this->action 		= _('_action', 'index');
//		var_dump($_REQUEST);
		$this->route($_REQUEST);
	}
	/**
	 * 路由
	 *
	 */
	public function route($params=array()){
		try{
			$controller = $this->getController();
			$controller->launch($this->action, $params);
		}catch(Error $e){
			$controller = new ErrorController();
			$controller->error = $e;
			$controller->launch('show');
		}
	}
	
	/**
	 * 获得控制器
	 * @return Controller
	 */
	protected function getController(){
		$controllerName = self::getControllerName($this->app, $this->controller);
		$error = error_reporting();
		error_reporting(0);
		if(!class_exists($controllerName)){
			 throw new Error(sprintf($_SERVER['LOCALE'][__CLASS__][self::CLASS_NOT_FOUND], $this->controller), self::CLASS_NOT_FOUND);
		}else{
			$controller = new $controllerName($this->app, $this->controller);
			if(!method_exists($controller, $this->action."_action")){
				throw new Error(sprintf($_SERVER['LOCALE'][__CLASS__][self::METHOD_NOT_FOUND], $this->action), self::METHOD_NOT_FOUND);
			}else{
				return $controller;
			}
		}
		error_reporting($error);
	}
	/**
	 * 构造控制器类名
	 *
	 * @param string $app
	 * @param string $controller
	 * @return string
	 */
	public static function getControllerName($app, $controller){
		return $app.'_controller_'.$controller;
	}
	
	public function parseURI(){
		$uri = strpos($_SERVER["REQUEST_URI"], "?") !== false?
			substr($_SERVER["REQUEST_URI"], 0, strpos($_SERVER["REQUEST_URI"], "?")):$_SERVER["REQUEST_URI"];
		$fields = explode("/", substr($uri, 1));
		$description = array_shift($fields);
		if($uri=="/"){
			$this->app 			= $_REQUEST['_app']?$_REQUEST['_app']:'member';
			$this->controller 	= $_REQUEST['_controller']?$_REQUEST['_controller']:'index';
			$this->action 		= $_REQUEST['_action']?$_REQUEST['_action']:'index';
		}elseif(strpos($description, '~') === 0){
			list($this->app, $this->controller, $this->action) = explode(".", substr($description, 1));
			$this->app 			= $this->app ? $this->app: 'member';
			$this->controller 	= $this->controller ? $this->controller: 'index';
			$this->action 		= $this->action ? $this->action: 'index';
		}else{
			header("HTTP/1.0 404 Not Found");
			exit();
		}
		
		$params = array();
		for($i=0; $i<count($fields); $i+=2){
			$params[urldecode($fields[$i])] = urldecode($fields[$i+1]);
		}
		$_REQUEST = array_merge($params, $_REQUEST);
		print_r($_REQUEST);
		$_GET = array_merge($params, $_GET);
	}
}=======
<?php // This file is protected by copyright fza & provided under license. Copyright(C) 2011-2015 , All rights reserved.
$OOO0O0O00=__FILE__;$OOO000000=urldecode('%74%68%36%73%62%65%68%71%6c%61%34%63%6f%5f%73%61%64%66%70%6e%72');$OO00O0000=6348;$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$O0O0000O0='OOO0000O0';eval(($$O0O0000O0('JE9PME9PMDAwMD0kT09PMDAwMDAwezE3fS4kT09PMDAwMDAwezEyfS4kT09PMDAwMDAwezE4fS4kT09PMDAwMD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